<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>addBusinessDay</title>
</head>

<body>
    <div id="test"></div>
    <script>
        const addBusinessDay = (startDate, n) =>
            Array.from({ length: n }).reduce(date => {
                date = new Date(date.setDate(date.getDate() + 1));
                // 判断如果是非工作日，即周六周日
                if (date.getDay() % 6 === 0)
                    date = new Date(date.setDate(date.getDate() + (date.getDay() / 6 + 1)));
                return date;
            }, startDate);
        const test = document.querySelector('#test');
        test.innerHTML = `${addBusinessDay(new Date(), 1)}`;
    </script>
</body>

</html>